package com.zhangql.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import android.R;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;


public class DataStore extends Activity{
	public void  recordData(Context ctx,int time,String kaluli,String fileName,String sportType){
		//��ʱ�Ѿ�ֹͣ,��ȡʱ��Ϳ�·�� �洢
		String costTime = String.valueOf(time);
		String endTime  = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
		//String kaluli   = activity.this.kaluli.getText().toString();
		
		//Context ctx = DataStore.this;       
        SharedPreferences sp = ctx.getSharedPreferences(fileName, MODE_WORLD_WRITEABLE);
        
        Editor editor = sp.edit();
        editor.putString(endTime, "costTime:"+costTime+";kaluli:"+kaluli+";Type:"+sportType);
        editor.commit();
	}
}
